Skip to content

Batch non-mocked frontend test files#5

Merged
zebbern merged 1 commit into
mainfrom
codex/batch-frontend-test-runner
Jun 20, 2026
Merged

Batch non-mocked frontend test files#5
zebbern merged 1 commit into
mainfrom
codex/batch-frontend-test-runner

Conversation

@zebbern

@zebbern zebbern commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • split frontend test-run planning into a tested helper
  • batch adjacent test files that do not use mock.module
  • keep mock.module test files isolated in their own Bun process

Verification

  • bun --cwd frontend test src/test/run-tests-plan.test.ts
  • bun --cwd=frontend run test
  • bun run typecheck
  • bun run lint
  • bun run test
  • git push pre-push hook reran typecheck and tests successfully

Signed-off-by: zebbern <185730623+zebbern@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 20, 2026 14:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the frontend test runner (bun run test in frontend/) by introducing a deterministic “test run planning” helper that groups contiguous non-mock.module(...) test files into batched Bun test invocations, while still isolating mock.module users into their own Bun process to avoid cross-test interference.

Changes:

  • Extracted test discovery + run planning logic into a new run-tests-plan.ts module.
  • Updated the serial test runner to execute a sequence of planned runs (batched vs isolated) and print a more informative completion summary.
  • Added focused unit tests covering deterministic test file collection, mock.module detection, and batching behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
frontend/src/test/run-tests-serial.ts Switches from per-file execution to executing planned runs (batch/isolated) using the new planner and prints updated progress/summary output.
frontend/src/test/run-tests-plan.ts New helper for deterministic test file collection, mock.module detection, and batching/isolating logic.
frontend/src/test/run-tests-plan.test.ts New unit tests validating file collection order, mock.module detection, and batching semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +45 to +46
const isolatedCount = runs.filter((run) => run.isolated).length;
const batchedCount = files.length - isolatedCount;
@zebbern zebbern merged commit 256c733 into main Jun 20, 2026
6 checks passed
@zebbern zebbern deleted the codex/batch-frontend-test-runner branch June 20, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants